package com.mongodb.document.test;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection = "address")
@Data
public class AddressDocument {
    @Id
    private String id;
    private String building;
    private Integer pincode;
    private String city;
    private String state;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
